package substring;

import java.util.ArrayList;
import java.util.List;

public class SubString {
	
	
	public static void main(String[] args) throws Exception{
		
		List<String> result = new ArrayList<String>();
		    
		for(int i = 0; i < 40; i++){
			
			
			Substr1 obj = new Substr1();
			
			//Substr2 obj = new Substr2();
			
			result.add(obj.getSubstring(1, 5));
			
		}
	 	
	}
	
	static class Substr1{
		
	    private String str = new String(new char[1000000]);
		
	    public String getSubstring(int begin,int end) {
	    	
	    	return str.substring(begin,end);
	    }
	}
	
	static class Substr2{
		
	    private String str = new String(new char[1000000]);
		
	    public String getSubstring(int begin,int end) {
	    	
	    	return new String(str.substring(begin,end));
	    }
	}
	

}
